home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
U-Utilities
/
(c)u1.d64
/
screen.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
452b
|
30 lines
10 J=0
20 JJ=56320+J
30 O$=CHR$(113)
40 PRINT CHR$(147)
50 XMAX=39
60 YMAX=23
70 X=INT(XMAX/2)
80 Y=INT(YMAX/2)
90 OLD=1024+40*Y+X
100 INDX=OLD
110 POKE INDX,VAL(O$)
120 JS=PEEK(JJ)
130 IF (JS AND 8)=8 THEN GOTO 140
134 X=X+1
137 IF X>XMAX THEN X=0
140 IF (JS AND 4)=4 THEN GOTO 150
144 X=X-1
147 IF X<0 THEN X=XMAX
150 IF (JS AND 2)=2 THEN GOTO 160
154 Y=Y+1
157 IF Y>YMAX THEN Y=0
160 IF (JS AND 1)=1 THEN GOTO 170
164 Y=Y-1
167 IF Y<0 THEN Y=YMAX
170 INDX=1024+40*Y+X
180 POKE OLD,32
190 OLD=INDX
200 GOTO 110
210 END